package com.wwwc.index.ejb.forum;

import java.util.ArrayList;
import java.util.Vector;
import java.util.Hashtable;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;

public interface Forum extends EJBObject {
    public String addNewForum(String table_name, String directory_id, int group_id, int position, 
			      int parent_id, int treply, String path, int size, int readers, 
			      float rating, java.util.Date date, String title, String user, 
			      String text, String image, String link, boolean allow_reply, boolean on_top,
			      boolean removed, String user_ip) throws RemoteException;
    public String updateSingleForumDetails(String table_name, String fid, String readers, 
					   String rating, String date, String title, String user, 
					   String text, String image, String link, String allow_reply, String on_top,
					   String removed) throws RemoteException;

    public int updateForumDetailsTotalParentReply(String table_name, int fid, int total_reply) throws RemoteException;
    public int updateForumDetailsReaders(String table_name, int fid) throws RemoteException;
    public int updateForumDetailsReaders(String table_name, String fid) throws RemoteException;
    public int deleteSingleForum(String table_name, String fid) throws RemoteException;
    public int removeSingleForum(String table_name, String fid) throws RemoteException;

    public ArrayList getForumDetailsList(String table_name, String directory_id, int from, int rows, 
					 boolean show_removed) throws RemoteException;
    public ArrayList getSearchResultList(String table_name, String directory_id, int from, int rows, 
					 boolean show_removed, String search_string) throws RemoteException;
    public Object getSingleForumDetails(String table_name, String fid) throws RemoteException;

    //public Hashtable getForumDetailsListHashtable(String table_name, String directory_id) throws RemoteException;
    //public Vector    getForumDetailsListVector(String table_name, String directory_id) throws RemoteException;
    //public Vector    getForumDetailsListIds(String table_name, String dir_id) throws RemoteException;

    public int tableExists(String table_name) throws RemoteException;
    public String createForumTable(String query) throws RemoteException;
    public int getTableRowCounter(String table_name, boolean include_removed) throws RemoteException;
    public int getSearchResultRowCounter(String table_name, boolean include_removed, String search_string) throws RemoteException;
    public int getForumDetailsReaders(String table_name, int fid) throws RemoteException;
}
